package org.blogwu.learn.algorithm.栈;

public class StackTest {
    public static void main(String[] args) {
        Stack<String> st = new Stack<>();
        st.push("1");
        st.push("2");
        st.push("3");
        st.push("4");
        st.push("5");
        System.out.println("stack size:" + st.getSize());
        while (st.getSize() > 0) {
            System.out.println("stack pop: " + st.pop());
        }
        // 5 + 1 + 4
    }
}
